<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>ie</title>
  <!--<script type="text/javascript">
    //获取url参数
    function getParameter(val) {
      var uri = window.location.search;
      var re = new RegExp("" + val + "=([^&?]*)", "ig");
      return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
    }
    var upload_callback = function(){
      var data=getParameter("s");
      var location_hash=location.hash;
      //ie6取不到hash???用那个方式取？暂使用url传参数s
      if(location_hash!=null && location_hash!="" && location_hash){
        var data = location.hash ? location.hash.substring(1) : '';
        document.getElementsByTagName("body")[0].innerHTML = '<pre>' + data  + '</pre>';
      }else{
        var data=getParameter("s");
        document.getElementsByTagName("body")[0].innerHTML = '<pre>' + data  + '</pre>';
      }
    };
  </script>-->
  <script type="text/javascript">
    function getParameter(val) {
      var uri = decodeURI(window.location.search);
      var re = new RegExp("" + val + "=([^&?]*)", "ig");
      return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
    }

    var upload_callback = function() {
      var error = getParameter("error");
      error = parseInt(error)
      var dataObject;
      if(error==0){
        var url = getParameter("url");
        dataObject = {"error": error, "url": url};
      }else{
        var message = getParameter("message");
        dataObject = {"error": error, "message": message};
      }
      var data =  JSON.stringify(dataObject)
      document.getElementsByTagName("body")[0].innerHTML = '<pre>' + data + '</pre>';
    }
  </script>
</head>
<body onload="upload_callback();">
</body>
</html>
